﻿
Imports Newtonsoft.Json

''' <summary>
''' 账号余额对象
''' </summary>
Public Class Balance

    ''' <summary>
    ''' 当前账户是否有余额可供 API 调用
    ''' </summary>
    ''' <returns></returns>
    <JsonProperty("is_available")>
    Public Property IsAvailable As Boolean

    ''' <summary>
    ''' 余额详情
    ''' </summary>
    ''' <returns></returns>
    <JsonProperty("balance_infos")>
    Public Property BalanceInfos As List(Of BalanceInfosType)

    ''' <summary>
    ''' 余额详情
    ''' </summary>
    Public Class BalanceInfosType

        ''' <summary>
        ''' 货币，人民币或美元[CNY, USD]
        ''' </summary>
        ''' <returns></returns>
        <JsonProperty("currency")>
        Public Property Currency As String

        ''' <summary>
        ''' 总的可用余额，包括赠金和充值余额
        ''' </summary>
        ''' <returns></returns>
        <JsonProperty("total_balance")>
        Public Property TotalBalance As String

        ''' <summary>
        ''' 未过期的赠金余额
        ''' </summary>
        ''' <returns></returns>
        <JsonProperty("granted_balance")>
        Public Property GrantedBalance As String

        ''' <summary>
        ''' 充值余额
        ''' </summary>
        ''' <returns></returns>
        <JsonProperty("topped_up_balance")>
        Public Property ToppedUpBalance As String
    End Class

End Class
